A Gauge chart using the Google Sheets connector
This goes in the documents header:
<script src="../libraries/RGraph.common.core.js" ></script>
<script src="../libraries/RGraph.common.sheets.js" ></script>
<script src="../libraries/RGraph.gauge.js" ></script>
Put this where you want the chart to show up:
<canvas id="cvs" width="300" height="300">
[No canvas support]
</canvas>
This is the code that generates the chart:
<script>
new RGraph.Sheets('1ncvARBgXaDjzuca9i7Jyep6JTv9kms-bbIzyAxbaT0E', 4, function (sheet)
{
var value = sheet.get('C3');
var gauge = new RGraph.Gauge({
id: 'cvs',
min: 0,
max: 100,
value: value,
options: {
textAccessible: true
}
}).grow();
});
</script>